#pragma once
#include "SCore.h"

struct CUSTOMVERTEX
{
	D3DXVECTOR3		p;
	D3DXVECTOR3		n;
	D3DCOLOR		c;
	D3DXVECTOR3		t;
};

#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_DIFFUSE|D3DFVF_TEX1)

struct	INDEX
{
	DWORD	_0, _1, _2;
};

class Sample : public SCore
{

public :
	SCamera					m_CameraLeft;
	SCamera					m_CameraRight;

private :
	LPDIRECT3DVERTEXBUFFER9	m_pVB;
	LPDIRECT3DINDEXBUFFER9	m_pIB;
	LPDIRECT3DTEXTURE9		m_pHeightTexture;
	LPDIRECT3DTEXTURE9		m_pDiffuseTexture;
	D3DXVECTOR3*			m_pvHeightMap;

public :
	DWORD					m_dwNumFace;
	DWORD					m_dwHeight;
	DWORD					m_dwWidth;
	BOOL					m_bLeftActive;
	POINT					deltatpos;
	

public : 	
	bool	Init();
	bool	Frame();
	bool	Render();
	bool	Release();

public :
	void			RenderScene();
	bool			ResetResource();

public:
	Sample(void); 
	~Sample(void); 
};